#include "Player.h"

Player::Player()
{
	sprite = Sprite();
	canmove = true;
}

Player::Player(float x, float y, int w, int h, SDL_Surface *image)
{
	sprite = Sprite(x, y, w, h, image);
	canmove = true;
}

void Player::Update(Uint32 dticks)
{

		sprite.x += sprite.dx * (dticks/1000.f);
		sprite.y += sprite.dy * (dticks/1000.f);

		sprite.CollBox.x = sprite.x;
		sprite.CollBox.y = sprite.y;
}

void Player::setDx(float dx)
{
	sprite.dx = dx;
}

void Player::setDy(float dy)
{
	sprite.dy = dy;
}
